<template>
  <footer @click='changeTitle'>
    <p>{{title}}</p>
    <p>{{copyright}}</p>
  </footer>
</template>

<script>
export default {
  name: 'app-footer',
  props: {
    title: {
      type: String,
      required: true
    }
  },
  methods: {
    changeTitle: function () {
      this.title = 'ABC'
    }
  },
  data () {
    return {
      copyright: 'Copyright 2018 Vue Demo'
    }
  }
}
</script>

<style scoped>
footer {
  background: #222;
  padding: 6px;
}

p {
  color: lightgreen;
  text-align: center;
}
</style>
